<!doctype html>
<html xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{$config.system_name}</title>
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="{$config.index_keywords}"/>
<meta name="description" content="{$config.index_description}"/>
{include file="common:column" /}
</head>
<body>
<div class="trm-mode-swich-animation-frame">
    <div class="trm-mode-swich-animation">
        <i class="layui-icon layui-icon-light-b"></i>
        <div class="trm-horizon"></div>
        <i class="layui-icon layui-icon-b-fill"></i>
    </div>
</div>
<div class="site-wrapper" id="trm-scroll-container">
	<div class="main-overlay"></div>
	<header class="header-default">
    {include file="common:header" /}
	</header>
	<section class="hero-carousel">
        <div class="container-xl">
            <div class="post-carousel-lg">
                {volist name=":get_news_hot_list()" id="vo"}<div class="post featured-post-xl">
                    <div class="details clearfix">
                        <span class="category-badge lg">首页推荐</span>
                        <h4 class="post-title"><a href="{$vo.url}">{$vo.title}</a></h4>
                        <ul class="meta list-inline mb-0">
                            <li class="list-inline-item"><a href="{$config.microblog}/about.html">{$config.linkman}</a></li>
                            <li class="list-inline-item">{$vo.create_time|date='M-d-Y H:i A'}</li>
                        </ul>
                    </div>
                    <a href="{$vo.url}">
                        <div class="thumb rounded">
                            <div class="inner data-bg-image" data-bg-image="{$vo.thumb}"></div>
                        </div>
                    </a>
                </div>{/volist}
                
            </div>
        </div>
    </section>
	<section class="main-content">
		<div class="container-xl">
			<div class="row gy-4">
				<div class="col-lg-8">
					<div class="padding-30 rounded bordered">
						<div class="row gy-5">
							{volist name=":get_news_zhid_list()" id="vo"  offset="0"  length='1'}<div class="col-sm-6">
								<div class="post">
									<div class="thumb rounded">
										<a class="category-badge position-absolute">首页置顶</a>
										<a href="{$vo.url}">
										    <div class="inner">
										        <img class="zhiding" src="{$vo.thumb}" alt="post-title" title="{$vo.title}">
									        </div>
									    </a>
									</div>
									<ul class="meta list-inline mt-4 mb-0">
										<li class="list-inline-item"><a href="{$config.microblog}/about.html"><img src="{$config.portrait}" class="author yuanava" alt="author"/><i class="layui-icon layui-icon-username"></i> {$config.linkman}</a></li>
										<li class="list-inline-item"><i class="layui-icon layui-icon-time-o"></i> {$vo.create_time|date='M-d-Y H:i A'}</li>
									</ul>
									<h5 class="post-title mb-3 mt-3"><a href="{$vo.url}">{$vo.title}</a></h5>
									<p class="excerpt mb-0">{$vo.description|cut_str=30}</p>
								</div>
							</div>{/volist}
							
							<div class="col-sm-6">
								{volist name=":get_news_zhid_list()" id="vo"  offset="1"  length='4'}<div class="post post-list-sm square">
									<div class="thumb rounded">
										<a href="{$vo.url}">
											<div class="inner">
										        <img class="zhidings" src="{$vo.thumb}" alt="post-title" title="{$vo.title}">
									        </div>
										</a>
									</div>
									<div class="details clearfix">
										<h6 class="post-title my-0"><a href="{$vo.url}">{$vo.title}</a></h6>
										<ul class="meta list-inline mt-1 mb-0">
											<li class="list-inline-item"><i class="layui-icon layui-icon-username"></i> {$config.linkman}</li>
										</ul>
									</div>
								</div>{/volist}

							</div>
						</div>
					</div>
					<div class="spacer" data-height="50"></div>
					<div class="section-header">
						<h3 class="section-title">站内相册</h3>
						<div class="slick-arrows-top">
							<button type="button" data-role="none" class="carousel-topNav-prev slick-custom-buttons" aria-label="Previous"><i class="layui-icon layui-icon-left"></i></button>
							<button type="button" data-role="none" class="carousel-topNav-next slick-custom-buttons" aria-label="Next"><i class="layui-icon layui-icon-right"></i></button>
						</div>
					</div>
					<div class="row post-carousel-twoCol post-carousel">
						{volist name=':get_photos_category_list()' id='vo'}<div class="post post-over-content col-md-6">
							<div class="details clearfix">
								<a class="category-badge" href="{$vo.url}">{$vo.name}</a>
								<ul class="meta list-inline mb-0">
									<li class="list-inline-item"><a href="{$config.microblog}/about.html"><i class="layui-icon layui-icon-username"></i> {$config.linkman}</a></li>
									<li class="list-inline-item"><a><i class="layui-icon layui-icon-website"></i> Ailcc.Com</a></li>
								</ul>
							</div>
							<a href="{$vo.url}">
								<div class="thumb rounded">
									<div class="inner">
										<img class="zhiding" src="{$vo.newphotos}" alt="thumb" />
									</div>
								</div>
							</a>
						</div>{/volist}
						
					</div>
					<div class="spacer" data-height="50"></div>
					<div class="section-header">
						<h3 class="section-title">文章列表</h3>
					</div>
					<div class="padding-30 rounded bordered">
						<div class="row">
							<div class="col-md-12 col-sm-6" id="centerlist">
							</div>
						</div>
					</div>
				</div>
                {include file="common:hot" /}
			</div>
		</div>
	</section>
{include file="common:footer" /}
{include file="common:columnjs" /}
<script>
    layui.use('flow', function(){
        var flow = layui.flow;
        var $ = layui.jquery;
        //手动点击加载下一页
        flow.load({
            elem: '#centerlist' //流加载容器
            ,scrollElem: '#centerlist' //滚动条所在元素，一般不用填，此处只是演示需要。
            ,isAuto: false     //自动加载  为true的时候是自动加载
            ,isLazyimg: true   //图片懒加载
            ,end:'<div class="text-center"><button class="btn btn-simples">没有更多了</button></div>'
            ,done: function(page, next){ //加载下一页
                setTimeout(function(){
                    $.get(
                        "{:url('index/datalist')}",
                        {page:page},
                        function(d){
//                      console.log(d);
                            var lis = [];
                            layui.each(d.res, function(index, item){  //遍历后台传过来的数据
                                var txtCenters = item.description;
                                var create_time_text = item.create_time_text;
                                var recommended_text = item.recommended_text;
                                var topped_text = item.topped_text;
                                
                                if(txtCenters.length > 40){
                                    txtCenters = txtCenters.substring(0,40) + '···';
                                }
                                if(create_time_text == 'New'){
                                    create_time_text = '<span class="badges"><span class="post-new">NEW</span></span>';
                                }else if(recommended_text == '推荐'){
                                    create_time_text = '<span class="badges"><span class="post-recommended">推荐</span></span>';
                                }else if(topped_text == '置顶'){
                                    create_time_text = '<span class="badges"><span class="post-topped">置顶</span></span>';
                                }else{
                                    create_time_text = '';
                                }
                                var html =
                                '<div class="post post-list clearfix">'
								+  '<div class="thumb rounded">'
                                +  ''+create_time_text+''
								+  '<a href="'+item.url+'">'
								+  '<div class="inner">'
								+  '<img class="zuixin" src="'+item.thumb+'" alt="post-title">'
								+  '</div>'
								+  '</a>'
								+  '</div>'
								+  '<div class="details">'
								+  '<ul class="meta list-inline mb-3">'
								+  '<li class="list-inline-item"><a href="../about.html"><img class="yuanava" src="{$config.portrait}" class="author" alt="author"/><i class="layui-icon layui-icon-username"></i> {$config.linkman}</a></li>'
								+  '<li class="list-inline-item"><a href="'+item.listurl+'">'+item.category_name+'</a></li>'
								+  '<li class="list-inline-item">'+item.create_time_YMD_A+'</li>'
							    +  '</ul>'
								+  '<h5 class="post-title"><a href="'+item.url+'">'+item.title+'</a></h5>'
								+  '<p class="excerpt mb-0">'+txtCenters+'</p>'
								+  '<div class="post-bottom clearfix d-flex align-items-center">'
								+  '<div class="social-share me-auto"></div>'
								+  '<div class="more-button float-end">'
								+  '<a href="'+item.url+'"><span class="icon-options"></span></a>'
								+  '</div>'
								+  '</div>'
								+  '</div>'
								+  '</div>'
                                lis.push(html);
                            });
                            next(lis.join(''),page < d.total_page);  //拼接成字符串
                        }
                    );
                },500);
            }
        });
 });
</script>
</body>
</html>